Skip to content

refactor(vara-eth-idea/frontend): cleanup chain entity layouts#2300

Merged
nikitayutanov merged 3 commits intomainfrom
ny-reuse-chain-entity-components
Jan 23, 2026
Merged

refactor(vara-eth-idea/frontend): cleanup chain entity layouts#2300
nikitayutanov merged 3 commits intomainfrom
ny-reuse-chain-entity-components

Conversation

@nikitayutanov
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors chain entity layouts in the vara-eth-idea frontend to consolidate UI patterns and improve code consistency. The refactoring introduces a reusable ChainEntity component pattern to standardize the display of blockchain entities (programs, codes, and users).

Changes:

  • Simplified formatDate utility function to use native toLocaleString() instead of custom formatting
  • Refactored user, program, and code pages to use new ChainEntity component subcomponents
  • Removed standalone NotFound component in favor of ChainEntity.NotFound
  • Updated Program type definitions to make fields optional and change type from number to string for createdAt

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
shared/utils/index.ts Simplified formatDate to use toLocaleString()
pages/user/user.tsx Refactored to use ChainEntity components and viem utilities
pages/user/user.module.scss Removed duplicate styles now handled by ChainEntity
pages/program/program.tsx Refactored to use ChainEntity components, improved loading checks
pages/program/program.module.scss Removed duplicate styles, added status and executableBalance styles
pages/code/code.tsx Refactored to use ChainEntity components and Link instead of anchor tag
pages/code/code.module.scss Removed duplicate styles now handled by ChainEntity
features/programs/lib/queries.ts Updated Program type with optional fields and string createdAt
features/messages/components/message-data/message-data.tsx Updated to use renamed BlockNumber component
components/ui/not-found/* Removed standalone NotFound component (3 files)
components/ui/index.ts Removed NotFound export
components/ui/chain-entity/chain-entity.tsx Renamed Block to BlockNumber for clarity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nikitayutanov nikitayutanov force-pushed the ny-reuse-chain-entity-components branch 2 times, most recently from 91e3fca to 5b8a2b7 Compare January 16, 2026 16:31
Base automatically changed from ny-message to main January 23, 2026 12:46
@nikitayutanov nikitayutanov force-pushed the ny-reuse-chain-entity-components branch from 4d12195 to 8315658 Compare January 23, 2026 12:48
@nikitayutanov nikitayutanov merged commit 3643e3c into main Jan 23, 2026
14 checks passed
@nikitayutanov nikitayutanov deleted the ny-reuse-chain-entity-components branch January 23, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C2-refactoring Refactoring proposal D6-vara-eth-idea Vara.Eth Idea

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants